Ask Learn
Preview
Please sign in to use this experience.
Sign inThis browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
![]() |
![]() |
Note This documentation is preliminary and is subject to change.
Every game in the Windows Vista Game Explorer can be interacted with by the user; this is done by way of tasks. An example of a task is launching the game when the user double-clicks on a game in the Game Explorer. This document details how and where to register tasks.
Tasks are the name for actions that can be taken with an entry in the Windows Vista Game Explorer. Tasks determine how a user can interact with a game in the Game Explorer. Using tasks, you can determine what will happen when the user double-clicks a game in the Game Explorer, and what entries show up in the context menu when a user right-clicks on a game.
One task, the primary play task, is required for every game; the primary play task is the task that executes when a user double-clicks on a game in the Game Explorer.
Tasks are associated with a game during the game's installation by creating subdirectories and adding shortcuts to these subdirectories associated with the game in the Game Explorer. The subdirectories are identified using the InstanceID, which was either created and passed into AddGame, or was generated and returned by AddGame.
To associate tasks with a game
Install all game files.
Call AddGame to add the game to the Game Explorer, either using a custom InstanceID GUID you designate, or letting AddGame create one for you.
Persist the GameInstanceID for use in uninstalling to either a file or the registry.
Create the "{GameInstanceID}" subdirectory of
Create the task subdirectories underneath the "{GameInstanceID}" subdirectory created in the previous step. There are two possible subdirectories: PlayTasks and SupportTasks.
Add the task shortcuts to the subdirectories created in the previous step.
When installing your game, you must create subdirectories in specific places for Game Explorer to recognize the tasks inside them. These subdirectories identify whether the task if for all users or a specific user, the instance of the game being installed, and which types of tasks you are creating (PlayTasks and/or SupportTasks).
To Create The Proper Task Directory Structure
Parent Directories of Game Explorer Task Folders for Windows XP and Windows Vista
Name | FolderID Definition for use with ShGetFolderPathEx (Windows Vista) | Legacy CSIDL Definition for use with ShGetFolderPath (Windows XP and Windows Vista) |
---|---|---|
Tasks for all users | FOLDERID_CommonGameTasks | CSIDL_COMMON_APPDATA\Microsoft\Windows\GameExplorer |
Tasks for the current user only user | FOLDERID_GameTasks | CSIDL_LOCAL_APPDATA\Microsoft\Windows\GameExplorer |
Example Task Directory Structure for a Windows XP and Windows Vista Game
//for all users //use ShGetFolderPath with CSIDL_COMMON_APPDATA\Microsoft\Windows\GameExplorer\ as the parent directory CSIDL_COMMON_APPDATA\Microsoft\Windows\GameExplorer\{00d8862b-6454-4957-a821-3d98d74c76be}\PlayTasks\0\Play.lnk CSIDL_COMMON_APPDATA\Microsoft\Windows\GameExplorer\{00d8862b-6454-4957-a821-3d98d74c76be}\PlayTasks\1\Play Online.lnk CSIDL_COMMON_APPDATA\Microsoft\Windows\GameExplorer\{00d8862b-6454-4957-a821-3d98d74c76be}\SupportTasks\0\My Game's Website.lnk //for the current user only //use ShGetFolderPath with CSIDL_LOCAL_APPDATA\Microsoft\Windows\GameExplorer\ as the parent directory CSIDL_LOCAL_APPDATA\Microsoft\Windows\GameExplorer\{00d8862b-6454-4957-a821-3d98d74c76be}\PlayTasks\2\Play Saved Game.lnk
Example Task Directory Structure for a Windows Vista Only Game
//for all users //use ShGetFolderPathEx with FOLDERID_CommonGameTasks as the parent directory FOLDERID_CommonGameTasks\{00d8862b-6454-4957-a821-3d98d74c76be}\PlayTasks\0\Play.lnk FOLDERID_CommonGameTasks\{00d8862b-6454-4957-a821-3d98d74c76be}\PlayTasks\1\Play Online.lnk FOLDERID_CommonGameTasks\{00d8862b-6454-4957-a821-3d98d74c76be}\SupportTasks\0\My Game's Website.lnk //for the current user only //use ShGetFolderPathEx with FOLDERID_GameTasks as the parent directory FOLDERID_GameTasks\{00d8862b-6454-4957-a821-3d98d74c76be}\PlayTasks\2\Play Saved Game.lnk
Task Rules
When uninstalling your game, use the persisted game InstanceID to find and delete the task directories for the instance of your game that is being uninstalled.
Please sign in to use this experience.
Sign in